import {reqCategoryList ,reqMockBanner,reqMockFloor }  from '@/api' 

//服务员
const actions = {
    async getCategoryList(context){
        context.commit('GETCATEGORYLIST', (await reqCategoryList()).data)
    },
    async getMockBanner({commit,dispatch,state,getters},payload){
        commit('GETMOCKBANNER',(await reqMockBanner()).data)
    },
    async getMockFloor({commit,dispatch,state,getters},payload){
        commit('GETMOCKFOLLR',(await reqMockFloor()).data)
    }
}
//厨师
const mutations = {
    //typeNav
    GETCATEGORYLIST(state,payload){state.categoryArr = payload},
    GETMOCKBANNER(state,payload){state.mockBanner = payload},
    GETMOCKFOLLR(state,payload){state.mockfloor = payload}
}
//仓库数据
const state = {
    //typeNav
    categoryArr:[],
    //banner
    mockBanner:[],
    //floor
    mockfloor:[]

}
const getters = {}

// 暴露小仓库内容
export default {
    actions,
    state,
    getters,
    mutations
}